import request from '@/utils/request' // 引入封装的request.js文件

// 导航栏
export function applyforinvoicing(query) {
    return request({
        url: '/website/check-bus-common/apply-for-invoicing?id='+query,
        method: 'post',
        // data: query
    })
}





// 导航栏
export function getnavigationList(query) {
    return request({
        url: '/website/bus-common/navigation',
        method: 'post',
        data: query
    })
}


// 查询分类下的产品列表
export function getproductlist(data) {
    return request({
        url: '/website/bus-common/product-list',
        method: 'post',
        data: data,

    })
}

// 查询产品明细
export function getproductinfo(query) {
    return request({
        url: '/website/bus-common/get-product-info',
        method: 'post',
        data: query,
    })
}
// 注册用户

export function register(query) {
    return request({
        url: '/register',
        method: 'post',
        data: query
    })
}

// 发送验证码
export function sendcaptcha(query) {
    return request({
        url: '/send-captcha',
        method: 'post',
        data: query
    })
}
// 用户登陆
export function login(query) {
    return request({
        url: '/login',
        method: 'post',
        data: query
    })
}

// 忘记密码
export function forgotpassword(query) {
    return request({
        url: '/forgot-password',
        method: 'post',
        data: query
    })
}

// 查询购物车列表
export function gwcartlist(query) {
    return request({
        url: '/website/check-bus-common/get-gwcart-list',
        method: 'post',
        data: query
    })
}


// 添加到购物车
export function addgwcart(query) {
    return request({
        url: '/website/check-bus-common/add-gwcart',
        method: 'post',
        data: query
    })
}

// 购物车添加产品数量
export function gwcartaddnumber(query) {
    return request({
        url: '/website/check-bus-common/gwcart-add-number',
        method: 'post',
        data: query
    })
}
// 删除购物车
export function delgwcart(query) {
    return request({
        url: '/website/check-bus-common/del-gwcart',
        method: 'post',
        data: query
    })
}

// 选中购物车
export function selgwcart(query) {
    return request({
        url: '/website/check-bus-common/select-gwcart',
        method: 'post',
        data: query
    })
}
// 查询个人信息

export function getuserinfo(query) {
    return request({
        url: '/website/check-bus-common/get-user-info',
        method: 'post',
        data: query
    })
}
// 基本信息修改
export function profile(query) {
    return request({
        url: '/system/user/profile',
        method: 'put',
        data: query
    })
}
// 修改密码
export function updatePwd(query) {
    return request({
        url: '/system/user/profile/update-pwd-bus',
        method: 'post',
        data: query
    })
}
// 修改开票信息

export function invoicing(query) {
    return request({
        url: '/system/user/profile/update-invoicing',
        method: 'post',
        data: query
    })
}
// 查询问题列表
export function getissuelist(query) {
    return request({
        url: '/website/check-bus-common/get-issue-list',
        method: 'post',
        data: query
    })
}
// 提问
export function addissue(query) {
    return request({
        url: '/website/check-bus-common/add-issue',
        method: 'post',
        data: query
    })
}

// export function addissueAgin() {
//     return request({
//         url: '/website/check-bus-common/add-issue',
//         method: 'post',
//     })
// }

// 文件上传
export function upload(query) {
    return request({
        url: '/system/oss/upload',
        method: 'post',
        data: query
    })
}
// 结算
export function settleaccounts(query) {
    return request({
        url: '/website/check-bus-common/settle-accounts',
        method: 'post',
        data: query
    })
}
// 首页查询
export function homepage(query) {
    return request({
        url: '/website/bus-common/home-page',
        method: 'post',
        data: query
    })
}
//  校验是否登陆
export function checklogin(query) {
    return request({
        url: '/website/bus-common/check-login',
        method: 'post',
        data: query
    })
}
// 我的订单

export function getorderlist(query) {
    return request({
        url: '/website/check-bus-common/get-order-list',
        method: 'post',
        data: query
    })
}

// export function getorderlist(contractType) {
//     return request({
//         url: `/website/check-bus-common/get-order-list/${contractType}`,
//         method: 'post'
//     })
// }

// 产品定制

export function productcustom() {
    return request({
        url: '/website/bus-common/product-custom',
        method: 'post',
    })
}
// 下载中心

export function downloadcenter(query) {
    return request({
        url: '/website/bus-common/download-center',
        method: 'post',
        data: query
    })
}

// 查询产品固件列表

export function getproductfirmware(query) {
    return request({
        url: '/website/bus-common/get-product-firmware',
        method: 'post',
        data: query
    })
}
// 联系我们
export function contactus() {
    return request({
        url: '/website/bus-common/contact-us',
        method: 'post',
    })
}








// 查询未读消息
export function searchnotread() {
    return request({
        url: '/website/check-bus-common/search-not-read',
        method: 'post',
    })
}
// 修改消息为已读
export function updateread() {
    return request({
        url: '/website/check-bus-common/update-read',
        method: 'post',
    })
}


// 公告
export function searchnotice() {
    return request({
        url: '/website/bus-common/search-notice',
        method: 'post',
    })
}

// 发起支付
export function gopay(data) {
    return request({
        url: '/website/check-bus-common/go-pay',
        method: 'post',
        data
    })
}

// 生成结算单
export function createquotation(query) {
    return request({
        url: '/website/check-bus-common/create-quotation',
        method: 'post',
        data: query
    })
}
export function calculatefare(query) {
    return request({
        url: 'website/check-bus-common/calculate-fare',
        method: 'post',
        data: query
    })
}

// 重新加入购物车
export function readdgwcart(id) {
    return request({
        url: `/website/check-bus-common/readd-gwcart?id=${id}`,
        method: 'post',
        // data: query
    })
}
// 继续支付

export function continuepay(id) {
    return request({
        url: `/website/check-bus-common/continue-pay?id=${id}`,
        method: 'post',
        // data: query
    })
}

// 删除订单
export function delorder(query) {
    return request({
        url: `/website/check-bus-common/del-order`,
        method: 'post',
        data: query
    })
}

// /website/check-bus-common/after-sales?id=88

// 售后

export function aftersales(id) {
    return request({
        url: `/website/check-bus-common/after-sales?id=${id}`,
        method: 'post',
        // data: query
    })
}
// 下载合同PDF

export function downloadpdf(query) {
    return request({
        url: '/website/check-bus-common/download-pdf?id='+query,
        method: 'post',
        // responseType: "blob",
    })
}
// 上传合同

export function uploadpdf(data) {
    return request({
        url: '/website/check-bus-common/upload-contract-pdf',
        method: 'post',
        data
    })
}


// 下载合同PDF

export function downloadquotation(query) {
    return request({
        url: '/website/check-bus-common/download-quotation?id='+query,
        method: 'post',
        responseType: "blob",
    })
}
// 上传流水单


export function uploadstream(query) {
    return request({
        url: '/website/check-bus-common/upload-pingzheng',
        method: 'post',
        data: query
    })
}

// 买家确认收货

export function confirmshouhuo(query) {
    return request({
        url: '/website/check-bus-common/confirm-shouhuo',
        method: 'post',
        data: query
    })
}
// 状态明细查询

export function contractstatus(query) {
    return request({
        url: '/website/check-bus-common/contract-status',
        method: 'post',
        data: query
    })
}






// noticeContent 公告内容

